package ModelLayer;



import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * The test class PersonTest.
 *
 * @author  (your name)
 * @version (a version number or a date)
 */
public class PersonTest
{
    private ModelLayer.Person person1;

    

    /**
     * Default constructor for test class PersonTest
     */
    public PersonTest()
    {
    }

    /**
     * Sets up the test fixture.
     *
     * Called before every test case method.
     */
    @Before
    public void setUp()
    {
        person1 = new ModelLayer.Person(1, "John", "Sofiendelsvej", "aaa", "Aalborg", "secret");
    }

    /**
     * Tears down the test fixture.
     *
     * Called after every test case method.
     */
    @After
    public void tearDown()
    {
    }

    @Test
    public void testSet_GetName()
    {
        person1.setName("Hans");
        assertEquals("Hans", person1.getName());
    }

    @Test
    public void testSet_GetAddress()
    {
        person1.setAddress("Sofiendalsvej");
        assertEquals("Sofiendalsvej", person1.getAddress());
    }

    @Test
    public void testSet_GetPhone()
    {
        person1.setPhone("967666");
        assertEquals("967666", person1.getPhone());
    }

    @Test
    public void testSet_GetCity()
    {
        person1.setCity("Copenhagen");
        assertEquals("Copenhagen", person1.getCity());
    }

    @Test
    public void testSet_GetPostalCode()
    {
        person1.setPostalCode("6781");
        assertEquals("6781", person1.getPostalCode());
    }
}





